<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                        rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/sre">首页</a>
                </li>
                <li>
                    <a href="#/sre/config/resource_budget_mng_list/">配置列表</a>
                </li>
                <li class="active">资源预算配置</li>
            </ul>
        </div>
    </div>
</div>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12 col-md-12 main">
            <div class="col-md-6 col-md-offset-3">
                <!--                <form name="form" ng-keydown="if(event.keyCode==13) return false;" ng-submit="form.$valid&&olapConfigAdd()" novalidate>-->
                <form name="form" novalidate>
                    <div class="form-group"
                        ng-class="{'has-error':form.resourceType.$error.required,'has-success':!form.resourceType.$error.required}">
                        <label style="padding: 0 0 5px">资源类型</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <select required name="resourceType" ng-model="vm.p.resourceType" class="form-control">
                            <option value="hdfs">hdfs</option>
                            <option value="clickHouse">clickHouse</option>
                            <option value="flink">flink</option>
                            <option value="kafka">kafka</option>
                        </select>
                        <span ng-show="form.resourceType.$error.required" class="help-block">请选择资源类型</span>
                    </div>

                    <div class="form-group"
                        ng-class="{'has-error':form.resourceUnit.$error.required,'has-success':!form.resourceUnit.$error.required}">
                        <label style="padding: 0 0 5px">资源计算单位</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <select required name="resourceUnit" ng-model="vm.p.resourceUnit" class="form-control">
                            <option value="TB">TB</option>
                            <option value="Cores">核数</option>
                            <option value="MB/s">MB/s</option>
                        </select>
                        <span ng-show="form.resourceUnit.$error.required" class="help-block">请选择资源计算单位</span>
                    </div>

                    <div class="form-group"
                        ng-class="{'has-error':form.resourceQuantity.$error.required,'has-success':!form.resourceQuantity.$error.required}">
                        <label style="padding: 0 0 5px">资源预算量</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <input type="number" step="0.01" class="form-control" name="owner" ng-model="vm.p.resourceQuantity"
                            required />
                        <span ng-show="form.resourceQuantity.$error.required" class="help-block">请填写资源预算量</span>
                    </div>

                    <div class="form-group">
                        <label style="padding: 0 0 5px">预算接口负责人：</label>
                        <select ng-model="vm.p.ownerId" class="selectpicker" data-live-search="true" name="ownerId"
                            data-size="10">
                            <option ng-repeat="x in vm.listUser" value="{{x.userName}}" data-tokens="{{x.userName}}"
                                my-repeat-finish="repeatFinish()">{{x.userCn}}</option>
                        </select>
                    </div>

                    <div class="form-group"
                        ng-class="{'has-error':form.settlementGroup.$error.required,'has-success':!form.settlementGroup.$error.required}">
                        <label style="padding: 0 0 5px">结算团队</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <input type="text" class="form-control" name="settlementGroup" ng-model="vm.p.settlementGroup"
                            required />
                        <span ng-show="form.settlementGroup.$error.required" class="help-block">请选择结算团队</span>
                    </div>
                    <div class="form-group">
                        <input class="btn btn-primary" ng-class="{'disabled':!form.$valid}" type="button" value="确定"
                            ng-click="form.$valid&&resourceBudgetSave()" />
                        <a href="#/sre/cost/resource_budget_mng_list/" class="btn btn-default">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--/.container-->
<script type="text/javascript" charset="UTF-8" src="../lib/bootstrap/js/bootstrap-tagsinput.js"></script>
<script type="text/javascript" charset="UTF-8" src="../lib/bootstrap/js/bootstrap-tagsinput-angular.js"></script>